﻿@using Lavka.Core
@using Lavka.Models
@{
    var context = new LavkaDbEntities();
}
<!DOCTYPE html>
<html>
<head>
    <title>@PagesHelper.GetPageTitle(Request.Path, context)</title>
    <meta name="description" content="@PagesHelper.GetPageDescription(Request.Path, context)"/>
    <meta name="keywords" content="@PagesHelper.GetPageKeywords(Request.Path, context)"/>
    <meta name="robots" content="index, follow" >

    @* Styles *@

    <link href="@Url.Content("~/Content/jquery.cleditor.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Menu.css")" rel="stylesheet" type="text/css" />

    @* Scripts *@

    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    
    <script src="@Url.Content("~/Scripts/Core.js")" type="text/javascript"></script>


        @* jQuery Theming *@
		<link type="text/css" href="@Url.Content("~/Content/themes/custom/css/custom-theme/jquery-ui-1.8.16.custom.css")" rel="stylesheet" />	
		<script type="text/javascript" src="@Url.Content("~/Content/themes/custom/js/jquery-1.6.2.min.js")"></script>
		<script type="text/javascript" src="@Url.Content("~/Content/themes/custom/js/jquery-ui-1.8.16.custom.min.js")"></script>
        <script type="text/javascript" src="@Url.Content("~/Content/themes/custom/js/jCorner.js")"></script>

        @*ThickBox*@
        <link type="text/css" href="@Url.Content("~/Content/themes/custom/ThickBox/thickbox.css")" rel="stylesheet" />	
        <script type="text/javascript" src="@Url.Content("~/Content/themes/custom/ThickBox/thickbox.js")"></script>

        @*Editor*@
        <script src="@Url.Content("~/Scripts/jquery.cleditor.min.js")" type="text/javascript" ></script>

        <script type="text/javascript">
            $(".block").corner();
            $("div.ui-corner-all").corner();
        </script>


        <script type="text/javascript">
        $(document).ready(function () {
            $("#SearchReference").autocomplete({
                source:
            function (request, response) {
                // define a function to call your Action (assuming UserController)
                $.ajax({
                    url: '/Search/GetReferences', type: "POST", dataType: "json",
                    // query will be the param used by your action method
                    data: { query: request.term, maxResults: 8 },
                    success: function (data) {
                        response($.map(data, function (item) {
                            return { label: item, value: item };
                        }));
                    }
                });
            }
            });

            $("#SearchName").autocomplete({
                source:
            function (request, response) {
                // define a function to call your Action (assuming UserController)
                $.ajax({
                    url: '/Search/GetNames', type: "POST", dataType: "json",
                    // query will be the param used by your action method
                    data: { query: request.term, maxResults: 8 },
                    success: function (data) {
                        response($.map(data, function (item) {
                            return { label: item, value: item };
                        }));
                    }
                });
            }
            });

            $(function () {
                $('#ddlBrands').change(function () {
                    $('#BrandId').val($('#ddlBrands option[value=' + $(this).val() + ']').val());
                });
            });            
        })

        </script>

        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-11985136-4']);
            _gaq.push(['_trackPageview']);

            (function () {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>
</head>
<body>
<div id="outer">
    @Html.Partial("AdminPanel")
    @Html.Partial("Menu")
    <div id="main">
        <div id="right">
            @if (CartHelper.Cart.Count > 0)
            {
            <div class="block order ui-corner-all">
                @Html.ActionLink("Оформить заказ", "Create", "Orders", UrlParameter.Optional, FormMethod.Get)
            </div>
            }
            <div class="block ui-corner-all">
                <div class="header">@Html.ActionLink("Акционные предложения","Index","Actions")</div>
                @Html.Partial("ActionsBlock")
            </div>
            <div class="block ui-corner-all">
                <div class="header">@Html.ActionLink("Статьи", "Index", "Articles")</div>
                @Html.Partial("ArticlesBlock")
            </div>
       
        </div>

        <div id="header">
@*            <a href="/home/index/">
                @*<img alt="Посудная лавка" src="@Url.Content("~/Content/images/logo.png")" />
            </a>
            <div style="float: right; margin-right:50px; font-size: 3em; font-weight: bold; color: #B8B37F;  
                text-shadow: 3px 3px 3px gray; margin-top: 0em;">
                    <small>(063)</small> 930-05-44<br/>
                    <small>(044)</small> 599-56-74
                </div>*@
        </div>

        <div id="Loader" class="ui-corner-all">
            Загрузка...
        </div>
        <div id="content">
        <div style="text-align: right;">
                
            @if (Request.IsAuthenticated && ViewContext.Controller.ValueProvider.GetValue("controller").RawValue != "Pages")
            {
                 <p>
                     @Html.ActionLink("Параметры страницы", "Edit", "Pages", new { path = Request.Path }, null)
                 </p>
            }
        </div>
        @Html.Partial("SitePath")
        @RenderBody()
        </div>
    </div>
</div>
<div id="footer">
    <p style="font-weight: bold; text-align: center;">
        <br/>
        &copy; <a href="http://www.posudnalavka.com.ua">Посудна лавка</a> @DateTime.Now.Year
    </p>
    <div>
        <a href="http://www.semantika.com.ua">Продвижение сайтов</a> -
        Semantika.com.ua    
    </div>
</div>
</body>
</html>
